import { memo } from 'react';
import type { ReactNode, FC } from 'react';
import { BannerContainerWrapper } from './style';
import metaIcon from '../metaIcon';
import MetaIcon from '../metaIcon';
import Search from 'antd/es/transfer/search';
import { RadioIDToNameMap } from '@/assets/data/loacl_data';
interface IProps {
  children?: ReactNode;
  arr: any[];
  search: number;
}

const BannerContainer: FC<IProps> = (props) => {
  const { arr, search } = props;
  return (
    <BannerContainerWrapper>
      {arr.map((item) => (
        <MetaIcon
          name={item.name}
          img={item.img}
          className={RadioIDToNameMap[search] == item.name ? 'active' : ''}
        ></MetaIcon>
      ))}
    </BannerContainerWrapper>
  );
};

export default memo(BannerContainer);
